package com.itheima.health.service;

import com.itheima.health.pojo.Member;

import java.util.List;
import java.util.Map;

/**
 * 会员Service
 */
public interface MemberService {

    /**
     * 根据id查询会员信息
     * @param memberId
     * @return
     */
    Member findById(Integer memberId);

    //根据手机号查询会员信息
    Member selectByTelephone(String telephone);

    //保存会员信息
    void save(Member member);

    /**
     * 创建或者更新会员
     * @param member
     * @return
     */
    Member createOrUpdate(Member member);

    /**
     * 根据月份集合返回会员数量集合
     * @param months
     * @return
     */
    List<Integer> countByMonth(List<String> months, Map<String,Integer> lastDays);
}
